<%@ page import="login.Users" %>
<%@ page import="login.User" %>
<%--
  Created by IntelliJ IDEA.
  User: RaysMac
  Date: 14. 12. 12.
  Time: 오전 8:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <title></title>
</head>
<body>
<%
  Object loginid =session.getAttribute("loginid");
  if(loginid==null){
%>
<h1>로그인</h1>
<form action="/Login" method="post">
  아이디 :<input type="test" name="id" /><br/><br/>
  비밀번호 :<input type="password" name="pw"/> <br/><br/>
  <input type="submit" value="로그인"/>
</form>

<%
}
else{
  User user= Users.getUsers((String)loginid);
%>
<h1>회원정보</h1>
<%=user.name%>(<%=user.age%>)님이 로그인하였습니다.<br/><br/>
<form action="/Logout" method="post">
  <input type="submit" value="로그아웃"/>
</form>
<%
  }
%></body>
</html>
